﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yun.Interface;
using Yun.Marketing.Response;

namespace Yun.Marketing.Request
{
    /// <summary>
    /// 获取商品专题关联商品列表
    /// yun.goods.apply.subject.list.get
    /// </summary>
    public class GetApplySubjectListRequest : ITopRequest<GetApplySubjectListResponse>
    {
        public string GetApiName()
        {
            return "yun.goods.apply.subject.list.get";
        }
        /// <summary>
        /// 页码
        /// </summary>
        public int PageNum
        {
            get { return _pageNum; }
            set
            {
                _pageNum = value < 1 ? 1 : value;
            }
        }

        private int _pageNum = 1;

        /// <summary>
        /// 页容量
        /// </summary>
        public int PageSize
        {
            get { return _pageSize; }
            set
            {
                _pageSize = value < 1 ? 1 : value;
            }
        }

        private int _pageSize = 1;

        /// <summary>
        /// 商品ID
        /// </summary>
        public long? GoodsId { get; set; }

        /// <summary>
        /// 专题ID
        /// </summary>
        public long? SubjectId { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        public string GoodsName { get; set; }

        /// <summary>
        /// 店铺ID
        /// </summary>
        public int? ShopsId { get; set; }

        /// <summary>
        /// 自定义推荐
        /// </summary>
        public int? Recommend { get; set; }


        public void Validate()
        {

        }

        public IDictionary<string, string> GetParameters()
        {
            var parameters = new YunDictionary
            {
                {"pagenum", PageNum},
                {"pagesize", PageSize},
                {"goodsid", GoodsId},
                {"subjectid", SubjectId},
                {"goodsname", GoodsName},
                {"shopsid", ShopsId}, 
                {"recommend", Recommend}
            };
            return parameters;
        }

    }
}
